while (<>) {
    chomp;
    s/#.*//;
    next unless /\S/;

    print $_ . "\n";
}
